<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        i {
            color: green
        }
    </style>
    <script src="./js/vue.js"></script>
    <script>
        window.onload = function() {

            var vm = new Vue({

                el: ".box",
                data: {
                    isLogin: true,
                    number: 6,
                    isShow: false
                }
            })
        }
    </script>
</head>

<body>

    <div class="box">

        <p v-show="isShow">真正显示和隐藏</p>

        <p v-if="number==1">1</p>
        <p v-else-if="number==2">2</p>
        <p v-else-if="number==3">3</p>
        <p v-else>4</p>



        <p v-if="isLogin">欢迎您:<i>老王</i></p>
        <p v-else>登录</p>
    </div>
</body>

</html>